package ro.cityprojects.adminloc.entities;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import java.util.Set;

/**
 * ExpenseTypes class
 *
 * @author bogdan.solga
 * 
 * Date: 13.06.2013, time: 17:47
 */
@javax.persistence.Table(name = "EXPENSE_TYPES")
@Entity
public class ExpenseTypes {

    @Id
    @javax.persistence.Column(name = "EXPENSE_TYPE_ID", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer expenseTypeId;

    public Integer getExpenseTypeId() {
        return expenseTypeId;
    }

    public void setExpenseTypeId(Integer expenseTypeId) {
        this.expenseTypeId = expenseTypeId;
    }

    @javax.persistence.Column(name = "TYPE", nullable = false, insertable = true, updatable = true, length = 32, precision = 0)
    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @OneToMany(mappedBy = "expenseTypesByExpenseType")
    private Set<Bill> billsByExpenseTypeId;

    public Set<Bill> getBillsByExpenseTypeId() {
        return billsByExpenseTypeId;
    }

    public void setBillsByExpenseTypeId(Set<Bill> billsByExpenseTypeId) {
        this.billsByExpenseTypeId = billsByExpenseTypeId;
    }

    @OneToMany(mappedBy = "expenseTypesByExpenseType")
    private Set<Consumption> consumptionsByExpenseTypeId;

    public Set<Consumption> getConsumptionsByExpenseTypeId() {
        return consumptionsByExpenseTypeId;
    }

    public void setConsumptionsByExpenseTypeId(Set<Consumption> consumptionsByExpenseTypeId) {
        this.consumptionsByExpenseTypeId = consumptionsByExpenseTypeId;
    }
}
